import { defHttp } from '@/utils/http/axios'

export interface DeviceExportReqVO {

  name?: string
  code?: string
  status?: number
}
// 查询vr设备列表
export function getDevicePage(params) {
  return defHttp.get({ url: '/vr/device/page', params })
}

// 查询vr设备详情
export function getDevice(id: number) {
  return defHttp.get({ url: `/vr/device/get?id=${id}` })
}

// 新增vr设备
export function createDevice(data) {
  return defHttp.post({ url: '/vr/device/create', data })
}

// 修改vr设备
export function updateDevice(data) {
  return defHttp.put({ url: '/vr/device/update', data })
}

export function updateDeviceGame(data) {
  return defHttp.post({ url: 'vr/device/updateDeviceGame', data })
}

// 删除vr设备
export function deleteDevice(id: number) {
  return defHttp.delete({ url: `/vr/device/delete?id=${id}` })
}

// 导出vr设备 Excel
export function exportDevice(params) {
  return defHttp.download({ url: '/vr/device/export-excel', params }, 'vr设备.xls')
}
